//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    motto: 'Hello World',
    url:""
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function (option) {
  //  setTimeout(
  //    ()=>{
  //      wx.setNavigationBarTitle({
  //        title: '趣味表情'
  //      })
  //    },1000
  //  )
    // console.log(option)
    wx.showLoading({
      title: '加载中',
    });
    var that = this;
    wx.getStorage({
      key: 'url',
      success(res) {
        var newdata = res.data;
        var x =  newdata.replace(/^http/, "https")
         that.setData(
            {
             url: x
            }
         )
      }
    })
    setTimeout(
      ()=>{
        wx.hideLoading();
      },3000
    )     
  },
  onShareAppMessage: function (res) {
   return {
      title: '应急预案智能管理小助手',
      path: '/pages/nextindex/index'
    }
  },
 
})
